<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - mbi.info - test/test_tools.hpp</title>
  <link rel="stylesheet" type="text/css" href="../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../index.html">directory</a> - <a href="index.html">test</a> - test_tools.hpp</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>mbi.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-01-23</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">20</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">0.0 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">0</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : //  (C) Copyright Gennadiy Rozental 2001-2008.
<span class="lineNum">       2 </span>                : //  Distributed under the Boost Software License, Version 1.0.
<span class="lineNum">       3 </span>                : //  (See accompanying file LICENSE_1_0.txt or copy at 
<span class="lineNum">       4 </span>                : //  http://www.boost.org/LICENSE_1_0.txt)
<span class="lineNum">       5 </span>                : 
<span class="lineNum">       6 </span>                : //  See http://www.boost.org/libs/test for the library home page.
<span class="lineNum">       7 </span>                : //
<span class="lineNum">       8 </span>                : //  File        : $RCSfile$
<span class="lineNum">       9 </span>                : //
<span class="lineNum">      10 </span>                : //  Version     : $Revision: 49312 $
<span class="lineNum">      11 </span>                : //
<span class="lineNum">      12 </span>                : //  Description : contains definition for all test tools in test toolbox
<span class="lineNum">      13 </span>                : // ***************************************************************************
<span class="lineNum">      14 </span>                : 
<span class="lineNum">      15 </span>                : #ifndef BOOST_TEST_TEST_TOOLS_HPP_012705GER
<span class="lineNum">      16 </span>                : #define BOOST_TEST_TEST_TOOLS_HPP_012705GER
<span class="lineNum">      17 </span>                : 
<span class="lineNum">      18 </span>                : // Boost.Test
<span class="lineNum">      19 </span>                : #include &lt;boost/test/predicate_result.hpp&gt;
<span class="lineNum">      20 </span>                : #include &lt;boost/test/unit_test_log.hpp&gt;
<span class="lineNum">      21 </span>                : #include &lt;boost/test/floating_point_comparison.hpp&gt;
<span class="lineNum">      22 </span>                : 
<span class="lineNum">      23 </span>                : #include &lt;boost/test/detail/config.hpp&gt;
<span class="lineNum">      24 </span>                : #include &lt;boost/test/detail/global_typedef.hpp&gt;
<span class="lineNum">      25 </span>                : #include &lt;boost/test/detail/workaround.hpp&gt;
<span class="lineNum">      26 </span>                : 
<span class="lineNum">      27 </span>                : #include &lt;boost/test/utils/wrap_stringstream.hpp&gt;
<span class="lineNum">      28 </span>                : #include &lt;boost/test/utils/basic_cstring/io.hpp&gt;
<span class="lineNum">      29 </span>                : #include &lt;boost/test/utils/lazy_ostream.hpp&gt;
<span class="lineNum">      30 </span>                : 
<span class="lineNum">      31 </span>                : // Boost
<span class="lineNum">      32 </span>                : #include &lt;boost/preprocessor/seq/for_each.hpp&gt;
<span class="lineNum">      33 </span>                : #include &lt;boost/preprocessor/seq/size.hpp&gt;
<span class="lineNum">      34 </span>                : #include &lt;boost/preprocessor/seq/enum.hpp&gt; 
<span class="lineNum">      35 </span>                : #include &lt;boost/preprocessor/repetition/repeat.hpp&gt;
<span class="lineNum">      36 </span>                : #include &lt;boost/preprocessor/punctuation/comma_if.hpp&gt;
<span class="lineNum">      37 </span>                : #include &lt;boost/preprocessor/arithmetic/add.hpp&gt;
<span class="lineNum">      38 </span>                : 
<span class="lineNum">      39 </span>                : #include &lt;boost/limits.hpp&gt;
<span class="lineNum">      40 </span>                : 
<span class="lineNum">      41 </span>                : #include &lt;boost/type_traits/is_array.hpp&gt;
<span class="lineNum">      42 </span>                : #include &lt;boost/type_traits/is_function.hpp&gt;
<span class="lineNum">      43 </span>                : #include &lt;boost/type_traits/is_abstract.hpp&gt;
<span class="lineNum">      44 </span>                : 
<span class="lineNum">      45 </span>                : #include &lt;boost/mpl/or.hpp&gt;
<span class="lineNum">      46 </span>                : 
<span class="lineNum">      47 </span>                : // STL
<span class="lineNum">      48 </span>                : #include &lt;cstddef&gt;          // for std::size_t
<span class="lineNum">      49 </span>                : #include &lt;iosfwd&gt;
<span class="lineNum">      50 </span>                : #include &lt;ios&gt;              // for std::boolalpha
<span class="lineNum">      51 </span>                : #include &lt;climits&gt;          // for CHAR_BIT
<span class="lineNum">      52 </span>                : 
<span class="lineNum">      53 </span>                : #ifdef BOOST_MSVC
<span class="lineNum">      54 </span>                : # pragma warning(disable: 4127) // conditional expression is constant
<span class="lineNum">      55 </span>                : #endif
<span class="lineNum">      56 </span>                : 
<span class="lineNum">      57 </span>                : #include &lt;boost/test/detail/suppress_warnings.hpp&gt;
<span class="lineNum">      58 </span>                : 
<span class="lineNum">      59 </span>                : //____________________________________________________________________________//
<span class="lineNum">      60 </span>                : 
<span class="lineNum">      61 </span>                : // ************************************************************************** //
<span class="lineNum">      62 </span>                : // **************                    TOOL BOX                  ************** //
<span class="lineNum">      63 </span>                : // ************************************************************************** //
<span class="lineNum">      64 </span>                : 
<span class="lineNum">      65 </span>                : // In macros below following argument abbreviations are used:
<span class="lineNum">      66 </span>                : // P - predicate
<span class="lineNum">      67 </span>                : // M - message
<span class="lineNum">      68 </span>                : // S - statement
<span class="lineNum">      69 </span>                : // E - exception
<span class="lineNum">      70 </span>                : // L - left argument
<span class="lineNum">      71 </span>                : // R - right argument
<span class="lineNum">      72 </span>                : // TL - tool level
<span class="lineNum">      73 </span>                : // CT - check type
<span class="lineNum">      74 </span>                : // ARGS - arguments list
<span class="lineNum">      75 </span>                : 
<span class="lineNum">      76 </span>                : #define BOOST_TEST_TOOL_IMPL( func, P, check_descr, TL, CT )            \
<span class="lineNum">      77 </span>                :     ::boost::test_tools::tt_detail::func(                               \
<span class="lineNum">      78 </span>                :         P,                                                              \
<span class="lineNum">      79 </span>                :         ::boost::unit_test::lazy_ostream::instance() &lt;&lt; check_descr,    \
<span class="lineNum">      80 </span>                :         BOOST_TEST_L(__FILE__),                                         \
<span class="lineNum">      81 </span>                :         (std::size_t)__LINE__,                                          \
<span class="lineNum">      82 </span>                :         ::boost::test_tools::tt_detail::TL,                             \
<span class="lineNum">      83 </span>                :         ::boost::test_tools::tt_detail::CT                              \
<span class="lineNum">      84 </span>                : /**/
<span class="lineNum">      85 </span>                : 
<span class="lineNum">      86 </span>                : //____________________________________________________________________________//
<span class="lineNum">      87 </span>                : 
<span class="lineNum">      88 </span>                : #define BOOST_CHECK_IMPL( P, check_descr, TL, CT )                  \
<span class="lineNum">      89 </span>                : do {                                                                \
<span class="lineNum">      90 </span>                :     BOOST_TEST_PASSPOINT();                                         \
<span class="lineNum">      91 </span>                :     BOOST_TEST_TOOL_IMPL( check_impl, P, check_descr, TL, CT ), 0 );\
<span class="lineNum">      92 </span>                : } while( ::boost::test_tools::dummy_cond )                          \
<span class="lineNum">      93 </span>                : /**/
<span class="lineNum">      94 </span>                : 
<span class="lineNum">      95 </span>                : //____________________________________________________________________________//
<span class="lineNum">      96 </span>                : 
<span class="lineNum">      97 </span>                : #define BOOST_TEST_PASS_ARG_INFO( r, data, arg ) , arg, BOOST_STRINGIZE( arg )
<span class="lineNum">      98 </span>                : 
<span class="lineNum">      99 </span>                : #define BOOST_CHECK_WITH_ARGS_IMPL( P, check_descr, TL, CT, ARGS )  \
<span class="lineNum">     100 </span>                : do {                                                                \
<span class="lineNum">     101 </span>                :     BOOST_TEST_PASSPOINT();                                         \
<span class="lineNum">     102 </span>                :     BOOST_TEST_TOOL_IMPL( check_frwd, P, check_descr, TL, CT )      \
<span class="lineNum">     103 </span>                :     BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_PASS_ARG_INFO, '_', ARGS ) ); \
<span class="lineNum">     104 </span>                : } while( ::boost::test_tools::dummy_cond )                          \
<span class="lineNum">     105 </span>                : /**/
<span class="lineNum">     106 </span>                : 
<span class="lineNum">     107 </span>                : //____________________________________________________________________________//
<span class="lineNum">     108 </span>                : 
<span class="lineNum">     109 </span>                : #define BOOST_WARN( P )                     BOOST_CHECK_IMPL( (P), BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED )
<span class="lineNum">     110 </span>                : #define BOOST_CHECK( P )                    BOOST_CHECK_IMPL( (P), BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED )
<span class="lineNum">     111 </span>                : #define BOOST_REQUIRE( P )                  BOOST_CHECK_IMPL( (P), BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED )
<span class="lineNum">     112 </span>                : 
<span class="lineNum">     113 </span>                : //____________________________________________________________________________//
<span class="lineNum">     114 </span>                : 
<span class="lineNum">     115 </span>                : #define BOOST_WARN_MESSAGE( P, M )          BOOST_CHECK_IMPL( (P), M, WARN, CHECK_MSG )
<span class="lineNum">     116 </span>                : #define BOOST_CHECK_MESSAGE( P, M )         BOOST_CHECK_IMPL( (P), M, CHECK, CHECK_MSG )
<span class="lineNum">     117 </span>                : #define BOOST_REQUIRE_MESSAGE( P, M )       BOOST_CHECK_IMPL( (P), M, REQUIRE, CHECK_MSG )
<span class="lineNum">     118 </span>                : 
<span class="lineNum">     119 </span>                : //____________________________________________________________________________//
<span class="lineNum">     120 </span>                : 
<span class="lineNum">     121 </span>                : #define BOOST_ERROR( M )                    BOOST_CHECK_MESSAGE( false, M )
<span class="lineNum">     122 </span>                : #define BOOST_FAIL( M )                     BOOST_REQUIRE_MESSAGE( false, M )
<span class="lineNum">     123 </span>                : 
<span class="lineNum">     124 </span>                : //____________________________________________________________________________//
<span class="lineNum">     125 </span>                : 
<span class="lineNum">     126 </span>                : #define BOOST_CHECK_THROW_IMPL( S, E, P, prefix, TL )                                                   \
<span class="lineNum">     127 </span>                :     try {                                                                                               \
<span class="lineNum">     128 </span>                :         BOOST_TEST_PASSPOINT();                                                                         \
<span class="lineNum">     129 </span>                :         S;                                                                                              \
<span class="lineNum">     130 </span>                :         BOOST_CHECK_IMPL( false, &quot;exception &quot; BOOST_STRINGIZE( E ) &quot; is expected&quot;, TL, CHECK_MSG ); }   \
<span class="lineNum">     131 </span>                :     catch( E const&amp; ex ) {                                                                              \
<span class="lineNum">     132 </span>                :         ::boost::unit_test::ut_detail::ignore_unused_variable_warning( ex );                            \
<span class="lineNum">     133 </span>                :         BOOST_CHECK_IMPL( P, prefix BOOST_STRINGIZE( E ) &quot; is caught&quot;, TL, CHECK_MSG );                 \
<span class="lineNum">     134 </span>                :     }                                                                                                   \
<span class="lineNum">     135 </span>                : /**/
<span class="lineNum">     136 </span>                : 
<span class="lineNum">     137 </span>                : //____________________________________________________________________________//
<span class="lineNum">     138 </span>                : 
<span class="lineNum">     139 </span>                : #define BOOST_WARN_THROW( S, E )            BOOST_CHECK_THROW_IMPL( S, E, true, &quot;exception &quot;, WARN )
<span class="lineNum">     140 </span>                : #define BOOST_CHECK_THROW( S, E )           BOOST_CHECK_THROW_IMPL( S, E, true, &quot;exception &quot;, CHECK )
<span class="lineNum">     141 </span>                : #define BOOST_REQUIRE_THROW( S, E )         BOOST_CHECK_THROW_IMPL( S, E, true, &quot;exception &quot;, REQUIRE )
<span class="lineNum">     142 </span>                : 
<span class="lineNum">     143 </span>                : //____________________________________________________________________________//
<span class="lineNum">     144 </span>                : 
<span class="lineNum">     145 </span>                : #define BOOST_WARN_EXCEPTION( S, E, P )     BOOST_CHECK_THROW_IMPL( S, E, P( ex ), &quot;incorrect exception &quot;, WARN )
<span class="lineNum">     146 </span>                : #define BOOST_CHECK_EXCEPTION( S, E, P )    BOOST_CHECK_THROW_IMPL( S, E, P( ex ), &quot;incorrect exception &quot;, CHECK )
<span class="lineNum">     147 </span>                : #define BOOST_REQUIRE_EXCEPTION( S, E, P )  BOOST_CHECK_THROW_IMPL( S, E, P( ex ), &quot;incorrect exception &quot;, REQUIRE )
<span class="lineNum">     148 </span>                : 
<span class="lineNum">     149 </span>                : //____________________________________________________________________________//
<span class="lineNum">     150 </span>                : 
<span class="lineNum">     151 </span>                : #define BOOST_CHECK_NO_THROW_IMPL( S, TL )                                                          \
<span class="lineNum">     152 </span>                :     try {                                                                                           \
<span class="lineNum">     153 </span>                :         S;                                                                                          \
<span class="lineNum">     154 </span>                :         BOOST_CHECK_IMPL( true, &quot;no exceptions thrown by &quot; BOOST_STRINGIZE( S ), TL, CHECK_MSG ); } \
<span class="lineNum">     155 </span>                :     catch( ... ) {                                                                                  \
<span class="lineNum">     156 </span>                :         BOOST_CHECK_IMPL( false, &quot;exception thrown by &quot; BOOST_STRINGIZE( S ), TL, CHECK_MSG );      \
<span class="lineNum">     157 </span>                :     }                                                                                               \
<span class="lineNum">     158 </span>                : /**/
<span class="lineNum">     159 </span>                : 
<span class="lineNum">     160 </span>                : #define BOOST_WARN_NO_THROW( S )            BOOST_CHECK_NO_THROW_IMPL( S, WARN )
<span class="lineNum">     161 </span>                : #define BOOST_CHECK_NO_THROW( S )           BOOST_CHECK_NO_THROW_IMPL( S, CHECK )
<span class="lineNum">     162 </span>                : #define BOOST_REQUIRE_NO_THROW( S )         BOOST_CHECK_NO_THROW_IMPL( S, REQUIRE )
<span class="lineNum">     163 </span>                : 
<span class="lineNum">     164 </span>                : //____________________________________________________________________________//
<span class="lineNum">     165 </span>                : 
<span class="lineNum">     166 </span>                : #define BOOST_WARN_EQUAL( L, R ) \
<span class="lineNum">     167 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::equal_impl_frwd(), &quot;&quot;, WARN, CHECK_EQUAL, (L)(R) )
<span class="lineNum">     168 </span>                : #define BOOST_CHECK_EQUAL( L, R ) \
<span class="lineNum">     169 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::equal_impl_frwd(), &quot;&quot;, CHECK, CHECK_EQUAL, (L)(R) )
<span class="lineNum">     170 </span>                : #define BOOST_REQUIRE_EQUAL( L, R ) \
<span class="lineNum">     171 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::equal_impl_frwd(), &quot;&quot;, REQUIRE, CHECK_EQUAL, (L)(R) )
<span class="lineNum">     172 </span>                : 
<span class="lineNum">     173 </span>                : //____________________________________________________________________________//
<span class="lineNum">     174 </span>                : 
<span class="lineNum">     175 </span>                : #define BOOST_WARN_NE( L, R ) \
<span class="lineNum">     176 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::ne_impl(), &quot;&quot;, WARN, CHECK_NE, (L)(R) )
<span class="lineNum">     177 </span>                : #define BOOST_CHECK_NE( L, R ) \
<span class="lineNum">     178 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::ne_impl(), &quot;&quot;, CHECK, CHECK_NE, (L)(R) )
<span class="lineNum">     179 </span>                : #define BOOST_REQUIRE_NE( L, R ) \
<span class="lineNum">     180 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::ne_impl(), &quot;&quot;, REQUIRE, CHECK_NE, (L)(R) )
<span class="lineNum">     181 </span>                : 
<span class="lineNum">     182 </span>                : //____________________________________________________________________________//
<span class="lineNum">     183 </span>                : 
<span class="lineNum">     184 </span>                : #define BOOST_WARN_LT( L, R ) \
<span class="lineNum">     185 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::lt_impl(), &quot;&quot;, WARN, CHECK_LT, (L)(R) )
<span class="lineNum">     186 </span>                : #define BOOST_CHECK_LT( L, R ) \
<span class="lineNum">     187 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::lt_impl(), &quot;&quot;, CHECK, CHECK_LT, (L)(R) )
<span class="lineNum">     188 </span>                : #define BOOST_REQUIRE_LT( L, R ) \
<span class="lineNum">     189 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::lt_impl(), &quot;&quot;, REQUIRE, CHECK_LT, (L)(R) )
<span class="lineNum">     190 </span>                : 
<span class="lineNum">     191 </span>                : //____________________________________________________________________________//
<span class="lineNum">     192 </span>                : 
<span class="lineNum">     193 </span>                : #define BOOST_WARN_LE( L, R ) \
<span class="lineNum">     194 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::le_impl(), &quot;&quot;, WARN, CHECK_LE, (L)(R) )
<span class="lineNum">     195 </span>                : #define BOOST_CHECK_LE( L, R ) \
<span class="lineNum">     196 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::le_impl(), &quot;&quot;, CHECK, CHECK_LE, (L)(R) )
<span class="lineNum">     197 </span>                : #define BOOST_REQUIRE_LE( L, R ) \
<span class="lineNum">     198 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::le_impl(), &quot;&quot;, REQUIRE, CHECK_LE, (L)(R) )
<span class="lineNum">     199 </span>                : 
<span class="lineNum">     200 </span>                : //____________________________________________________________________________//
<span class="lineNum">     201 </span>                : 
<span class="lineNum">     202 </span>                : #define BOOST_WARN_GT( L, R ) \
<span class="lineNum">     203 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::gt_impl(), &quot;&quot;, WARN, CHECK_GT, (L)(R) )
<span class="lineNum">     204 </span>                : #define BOOST_CHECK_GT( L, R ) \
<span class="lineNum">     205 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::gt_impl(), &quot;&quot;, CHECK, CHECK_GT, (L)(R) )
<span class="lineNum">     206 </span>                : #define BOOST_REQUIRE_GT( L, R ) \
<span class="lineNum">     207 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::gt_impl(), &quot;&quot;, REQUIRE, CHECK_GT, (L)(R) )
<span class="lineNum">     208 </span>                : 
<span class="lineNum">     209 </span>                : //____________________________________________________________________________//
<span class="lineNum">     210 </span>                : 
<span class="lineNum">     211 </span>                : #define BOOST_WARN_GE( L, R ) \
<span class="lineNum">     212 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::ge_impl(), &quot;&quot;, WARN, CHECK_GE, (L)(R) )
<span class="lineNum">     213 </span>                : #define BOOST_CHECK_GE( L, R ) \
<span class="lineNum">     214 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::ge_impl(), &quot;&quot;, CHECK, CHECK_GE, (L)(R) )
<span class="lineNum">     215 </span>                : #define BOOST_REQUIRE_GE( L, R ) \
<span class="lineNum">     216 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::tt_detail::ge_impl(), &quot;&quot;, REQUIRE, CHECK_GE, (L)(R) )
<span class="lineNum">     217 </span>                : 
<span class="lineNum">     218 </span>                : //____________________________________________________________________________//
<span class="lineNum">     219 </span>                : 
<span class="lineNum">     220 </span>                : #define BOOST_WARN_CLOSE( L, R, T ) \
<span class="lineNum">     221 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::check_is_close, &quot;&quot;, WARN, CHECK_CLOSE, \
<span class="lineNum">     222 </span>                :         (L)(R)(::boost::test_tools::percent_tolerance(T)) )
<span class="lineNum">     223 </span>                : #define BOOST_CHECK_CLOSE( L, R, T ) \
<span class="lineNum">     224 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::check_is_close, &quot;&quot;, CHECK, CHECK_CLOSE, \
<span class="lineNum">     225 </span>                :         (L)(R)(::boost::test_tools::percent_tolerance(T)) )
<span class="lineNum">     226 </span>                : #define BOOST_REQUIRE_CLOSE( L, R, T ) \
<span class="lineNum">     227 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::check_is_close, &quot;&quot;, REQUIRE, CHECK_CLOSE, \
<span class="lineNum">     228 </span>                :         (L)(R)(::boost::test_tools::percent_tolerance(T)) )
<span class="lineNum">     229 </span>                : 
<span class="lineNum">     230 </span>                : //____________________________________________________________________________//
<span class="lineNum">     231 </span>                : 
<span class="lineNum">     232 </span>                : #define BOOST_WARN_CLOSE_FRACTION( L, R, T ) \
<span class="lineNum">     233 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::check_is_close, &quot;&quot;, WARN, CHECK_CLOSE_FRACTION, \
<span class="lineNum">     234 </span>                :     (L)(R)(::boost::test_tools::fraction_tolerance(T)) )
<span class="lineNum">     235 </span>                : #define BOOST_CHECK_CLOSE_FRACTION( L, R, T ) \
<span class="lineNum">     236 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::check_is_close, &quot;&quot;, CHECK, CHECK_CLOSE_FRACTION, \
<span class="lineNum">     237 </span>                :     (L)(R)(::boost::test_tools::fraction_tolerance(T)) )
<span class="lineNum">     238 </span>                : #define BOOST_REQUIRE_CLOSE_FRACTION( L, R, T ) \
<span class="lineNum">     239 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::check_is_close, &quot;&quot;, REQUIRE, CHECK_CLOSE_FRACTION, \
<span class="lineNum">     240 </span>                :     (L)(R)(::boost::test_tools::fraction_tolerance(T)) )
<span class="lineNum">     241 </span>                : 
<span class="lineNum">     242 </span>                : //____________________________________________________________________________//
<span class="lineNum">     243 </span>                : 
<span class="lineNum">     244 </span>                : #define BOOST_WARN_SMALL( FPV, T ) \
<span class="lineNum">     245 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::check_is_small, &quot;&quot;, WARN, CHECK_SMALL, (FPV)(T) )
<span class="lineNum">     246 </span>                : #define BOOST_CHECK_SMALL( FPV, T ) \
<span class="lineNum">     247 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::check_is_small, &quot;&quot;, CHECK, CHECK_SMALL, (FPV)(T) )
<span class="lineNum">     248 </span>                : #define BOOST_REQUIRE_SMALL( FPV, T ) \
<span class="lineNum">     249 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( ::boost::test_tools::check_is_small, &quot;&quot;, REQUIRE, CHECK_SMALL, (FPV)(T) )
<span class="lineNum">     250 </span>                : 
<span class="lineNum">     251 </span>                : //____________________________________________________________________________//
<span class="lineNum">     252 </span>                : 
<span class="lineNum">     253 </span>                : #define BOOST_WARN_PREDICATE( P, ARGS ) \
<span class="lineNum">     254 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( P, BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED_WITH_ARGS, ARGS )
<span class="lineNum">     255 </span>                : #define BOOST_CHECK_PREDICATE( P, ARGS ) \
<span class="lineNum">     256 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( P, BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED_WITH_ARGS, ARGS )
<span class="lineNum">     257 </span>                : #define BOOST_REQUIRE_PREDICATE( P, ARGS ) \
<span class="lineNum">     258 </span>                :     BOOST_CHECK_WITH_ARGS_IMPL( P, BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED_WITH_ARGS, ARGS )
<span class="lineNum">     259 </span>                : 
<span class="lineNum">     260 </span>                : //____________________________________________________________________________//
<span class="lineNum">     261 </span>                : 
<span class="lineNum">     262 </span>                : #define BOOST_EQUAL_COLLECTIONS_IMPL( L_begin, L_end, R_begin, R_end, TL )      \
<span class="lineNum">     263 </span>                :     BOOST_TEST_TOOL_IMPL( check_impl, ::boost::test_tools::tt_detail::equal_coll_impl( \
<span class="lineNum">     264 </span>                :         (L_begin), (L_end), (R_begin), (R_end) ), &quot;&quot;, TL, CHECK_EQUAL_COLL ),   \
<span class="lineNum">     265 </span>                :     4,                                                                          \
<span class="lineNum">     266 </span>                :     BOOST_STRINGIZE( L_begin ), BOOST_STRINGIZE( L_end ),                       \
<span class="lineNum">     267 </span>                :     BOOST_STRINGIZE( R_begin ), BOOST_STRINGIZE( R_end ) )                      \
<span class="lineNum">     268 </span>                : /**/
<span class="lineNum">     269 </span>                : 
<span class="lineNum">     270 </span>                : #define BOOST_WARN_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end )          \
<span class="lineNum">     271 </span>                :     BOOST_EQUAL_COLLECTIONS_IMPL( L_begin, L_end, R_begin, R_end, WARN )
<span class="lineNum">     272 </span>                : #define BOOST_CHECK_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end )         \
<span class="lineNum">     273 </span>                :     BOOST_EQUAL_COLLECTIONS_IMPL( L_begin, L_end, R_begin, R_end, CHECK )
<span class="lineNum">     274 </span>                : #define BOOST_REQUIRE_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end )       \
<span class="lineNum">     275 </span>                :     BOOST_EQUAL_COLLECTIONS_IMPL( L_begin, L_end, R_begin, R_end, REQUIRE )
<span class="lineNum">     276 </span>                : 
<span class="lineNum">     277 </span>                : //____________________________________________________________________________//
<span class="lineNum">     278 </span>                : 
<span class="lineNum">     279 </span>                : #define BOOST_BITWISE_EQUAL_IMPL( L, R, TL )                                    \
<span class="lineNum">     280 </span>                :     BOOST_TEST_TOOL_IMPL( check_impl,                                           \
<span class="lineNum">     281 </span>                :       ::boost::test_tools::tt_detail::bitwise_equal_impl( (L), (R) ),           \
<span class="lineNum">     282 </span>                :       &quot;&quot;, TL, CHECK_BITWISE_EQUAL ),                                            \
<span class="lineNum">     283 </span>                :     2, BOOST_STRINGIZE( L ), BOOST_STRINGIZE( R ) )                             \
<span class="lineNum">     284 </span>                : /**/
<span class="lineNum">     285 </span>                : 
<span class="lineNum">     286 </span>                : #define BOOST_WARN_BITWISE_EQUAL( L, R )    BOOST_BITWISE_EQUAL_IMPL( L, R, WARN )
<span class="lineNum">     287 </span>                : #define BOOST_CHECK_BITWISE_EQUAL( L, R )   BOOST_BITWISE_EQUAL_IMPL( L, R, CHECK )
<span class="lineNum">     288 </span>                : #define BOOST_REQUIRE_BITWISE_EQUAL( L, R ) BOOST_BITWISE_EQUAL_IMPL( L, R, REQUIRE )
<span class="lineNum">     289 </span>                : 
<span class="lineNum">     290 </span>                : //____________________________________________________________________________//
<span class="lineNum">     291 </span>                : 
<span class="lineNum">     292 </span>                : #define BOOST_IS_DEFINED( symb )            ::boost::test_tools::tt_detail::is_defined_impl( #symb, BOOST_STRINGIZE(= symb) )
<span class="lineNum">     293 </span>                : 
<span class="lineNum">     294 </span>                : //____________________________________________________________________________//
<span class="lineNum">     295 </span>                : 
<span class="lineNum">     296 </span>                : // ***************************** //
<span class="lineNum">     297 </span>                : // deprecated interface
<span class="lineNum">     298 </span>                : 
<span class="lineNum">     299 </span>                : #define BOOST_BITWISE_EQUAL( L, R )         BOOST_CHECK_BITWISE_EQUAL( L, R )
<span class="lineNum">     300 </span>                : #define BOOST_MESSAGE( M )                  BOOST_TEST_MESSAGE( M )
<span class="lineNum">     301 </span>                : #define BOOST_CHECKPOINT( M )               BOOST_TEST_CHECKPOINT( M )
<span class="lineNum">     302 </span>                : 
<span class="lineNum">     303 </span>                : namespace boost {
<span class="lineNum">     304 </span>                : 
<span class="lineNum">     305 </span>                : namespace test_tools {
<span class="lineNum">     306 </span>                : 
<span class="lineNum">     307 </span>                : typedef unit_test::const_string      const_string;
<span class="lineNum">     308 </span>                : 
<span class="lineNum">     309 </span>                : namespace { bool const dummy_cond = false; }
<span class="lineNum">     310 </span>                : 
<span class="lineNum">     311 </span>                : // ************************************************************************** //
<span class="lineNum">     312 </span>                : // **************                print_log_value               ************** //
<span class="lineNum">     313 </span>                : // ************************************************************************** //
<span class="lineNum">     314 </span>                : 
<span class="lineNum">     315 </span>                : template&lt;typename T&gt;
<span class="lineNum">     316 </span>                : struct print_log_value {
<span class="lineNum">     317 </span><span class="lineNoCov">              0 :     void    operator()( std::ostream&amp; ostr, T const&amp; t )</span>
<span class="lineNum">     318 </span>                :     {
<span class="lineNum">     319 </span>                :         // avoid warning: 'boost::test_tools::&lt;unnamed&gt;::dummy_cond' defined but not used 
<span class="lineNum">     320 </span>                :         if (::boost::test_tools::dummy_cond) {}
<span class="lineNum">     321 </span>                : 
<span class="lineNum">     322 </span>                :         typedef typename mpl::or_&lt;is_array&lt;T&gt;,is_function&lt;T&gt;,is_abstract&lt;T&gt; &gt;::type couldnt_use_nl;
<span class="lineNum">     323 </span>                : 
<span class="lineNum">     324 </span><span class="lineNoCov">              0 :         set_precision( ostr, couldnt_use_nl() );</span>
<span class="lineNum">     325 </span>                : 
<span class="lineNum">     326 </span><span class="lineNoCov">              0 :         ostr &lt;&lt; t; // by default print the value</span>
<span class="lineNum">     327 </span><span class="lineNoCov">              0 :     }</span>
<span class="lineNum">     328 </span>                : 
<span class="lineNum">     329 </span><span class="lineNoCov">              0 :     void set_precision( std::ostream&amp; ostr, mpl::false_ )</span>
<span class="lineNum">     330 </span>                :     {
<span class="lineNum">     331 </span>                :         if( std::numeric_limits&lt;T&gt;::is_specialized &amp;&amp; std::numeric_limits&lt;T&gt;::radix == 2 )
<span class="lineNum">     332 </span><span class="lineNoCov">              0 :             ostr.precision( 2 + std::numeric_limits&lt;T&gt;::digits * 301/1000 ); </span>
<span class="lineNum">     333 </span><span class="lineNoCov">              0 :     }</span>
<span class="lineNum">     334 </span>                : 
<span class="lineNum">     335 </span>                :     void set_precision( std::ostream&amp;, mpl::true_ ) {}
<span class="lineNum">     336 </span>                : };
<span class="lineNum">     337 </span>                : 
<span class="lineNum">     338 </span>                : //____________________________________________________________________________//
<span class="lineNum">     339 </span>                : 
<span class="lineNum">     340 </span>                : #define BOOST_TEST_DONT_PRINT_LOG_VALUE( the_type )         \
<span class="lineNum">     341 </span>                : namespace boost { namespace test_tools {                    \
<span class="lineNum">     342 </span>                : template&lt;&gt;                                                  \
<span class="lineNum">     343 </span>                : struct print_log_value&lt;the_type &gt; {                         \
<span class="lineNum">     344 </span>                :     void operator()( std::ostream&amp;, the_type const&amp; ) {}    \
<span class="lineNum">     345 </span>                : };                                                          \
<span class="lineNum">     346 </span>                : }}                                                          \
<span class="lineNum">     347 </span>                : /**/
<span class="lineNum">     348 </span>                : 
<span class="lineNum">     349 </span>                : //____________________________________________________________________________//
<span class="lineNum">     350 </span>                : 
<span class="lineNum">     351 </span>                : #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
<span class="lineNum">     352 </span>                : template&lt;typename T, std::size_t N &gt;
<span class="lineNum">     353 </span>                : struct print_log_value&lt; T[N] &gt; {
<span class="lineNum">     354 </span>                :     void    operator()( std::ostream&amp; ostr, T const* t )
<span class="lineNum">     355 </span>                :     {
<span class="lineNum">     356 </span>                :         ostr &lt;&lt; t;
<span class="lineNum">     357 </span>                :     }
<span class="lineNum">     358 </span>                : };
<span class="lineNum">     359 </span>                : #endif
<span class="lineNum">     360 </span>                : 
<span class="lineNum">     361 </span>                : //____________________________________________________________________________//
<span class="lineNum">     362 </span>                : 
<span class="lineNum">     363 </span>                : template&lt;&gt;
<span class="lineNum">     364 </span>                : struct BOOST_TEST_DECL print_log_value&lt;bool&gt; {
<span class="lineNum">     365 </span>                :     void    operator()( std::ostream&amp; ostr, bool t )
<span class="lineNum">     366 </span>                :     {
<span class="lineNum">     367 </span>                :          ostr &lt;&lt; std::boolalpha &lt;&lt; t;
<span class="lineNum">     368 </span>                :     }
<span class="lineNum">     369 </span>                : };
<span class="lineNum">     370 </span>                : 
<span class="lineNum">     371 </span>                : //____________________________________________________________________________//
<span class="lineNum">     372 </span>                : 
<span class="lineNum">     373 </span>                : template&lt;&gt;
<span class="lineNum">     374 </span>                : struct BOOST_TEST_DECL print_log_value&lt;char&gt; {
<span class="lineNum">     375 </span>                :     void    operator()( std::ostream&amp; ostr, char t );
<span class="lineNum">     376 </span>                : };
<span class="lineNum">     377 </span>                : 
<span class="lineNum">     378 </span>                : //____________________________________________________________________________//
<span class="lineNum">     379 </span>                : 
<span class="lineNum">     380 </span>                : template&lt;&gt;
<span class="lineNum">     381 </span>                : struct BOOST_TEST_DECL print_log_value&lt;unsigned char&gt; {
<span class="lineNum">     382 </span>                :     void    operator()( std::ostream&amp; ostr, unsigned char t );
<span class="lineNum">     383 </span>                : };
<span class="lineNum">     384 </span>                : 
<span class="lineNum">     385 </span>                : //____________________________________________________________________________//
<span class="lineNum">     386 </span>                : 
<span class="lineNum">     387 </span>                : template&lt;&gt;
<span class="lineNum">     388 </span>                : struct BOOST_TEST_DECL print_log_value&lt;char const*&gt; {
<span class="lineNum">     389 </span>                :     void    operator()( std::ostream&amp; ostr, char const* t );
<span class="lineNum">     390 </span>                : };
<span class="lineNum">     391 </span>                : 
<span class="lineNum">     392 </span>                : //____________________________________________________________________________//
<span class="lineNum">     393 </span>                : 
<span class="lineNum">     394 </span>                : template&lt;&gt;
<span class="lineNum">     395 </span>                : struct BOOST_TEST_DECL print_log_value&lt;wchar_t const*&gt; {
<span class="lineNum">     396 </span>                :     void    operator()( std::ostream&amp; ostr, wchar_t const* t );
<span class="lineNum">     397 </span>                : };
<span class="lineNum">     398 </span>                : 
<span class="lineNum">     399 </span>                : //____________________________________________________________________________//
<span class="lineNum">     400 </span>                : 
<span class="lineNum">     401 </span>                : namespace tt_detail {
<span class="lineNum">     402 </span>                : 
<span class="lineNum">     403 </span>                : // ************************************************************************** //
<span class="lineNum">     404 </span>                : // **************              tools classification            ************** //
<span class="lineNum">     405 </span>                : // ************************************************************************** //
<span class="lineNum">     406 </span>                : 
<span class="lineNum">     407 </span>                : enum check_type {
<span class="lineNum">     408 </span>                :     CHECK_PRED, 
<span class="lineNum">     409 </span>                :     CHECK_MSG,
<span class="lineNum">     410 </span>                :     CHECK_EQUAL,
<span class="lineNum">     411 </span>                :     CHECK_NE,
<span class="lineNum">     412 </span>                :     CHECK_LT,
<span class="lineNum">     413 </span>                :     CHECK_LE,
<span class="lineNum">     414 </span>                :     CHECK_GT,
<span class="lineNum">     415 </span>                :     CHECK_GE,
<span class="lineNum">     416 </span>                :     CHECK_CLOSE,
<span class="lineNum">     417 </span>                :     CHECK_CLOSE_FRACTION,
<span class="lineNum">     418 </span>                :     CHECK_SMALL,
<span class="lineNum">     419 </span>                :     CHECK_BITWISE_EQUAL,
<span class="lineNum">     420 </span>                :     CHECK_PRED_WITH_ARGS,
<span class="lineNum">     421 </span>                :     CHECK_EQUAL_COLL
<span class="lineNum">     422 </span>                : };
<span class="lineNum">     423 </span>                : 
<span class="lineNum">     424 </span>                : enum tool_level {
<span class="lineNum">     425 </span>                :     WARN, CHECK, REQUIRE, PASS
<span class="lineNum">     426 </span>                : };
<span class="lineNum">     427 </span>                : 
<span class="lineNum">     428 </span>                : // ************************************************************************** //
<span class="lineNum">     429 </span>                : // **************                 print_helper                 ************** //
<span class="lineNum">     430 </span>                : // ************************************************************************** //
<span class="lineNum">     431 </span>                : // Adds level of indirection to the output operation, allowing us to customize 
<span class="lineNum">     432 </span>                : // it for types that do not support operator &lt;&lt; directly or for any other reason
<span class="lineNum">     433 </span>                : 
<span class="lineNum">     434 </span>                : template&lt;typename T&gt;
<span class="lineNum">     435 </span>                : struct print_helper_t {
<span class="lineNum">     436 </span><span class="lineNoCov">              0 :     explicit    print_helper_t( T const&amp; t ) : m_t( t ) {}</span>
<span class="lineNum">     437 </span>                : 
<span class="lineNum">     438 </span>                :     T const&amp;    m_t;
<span class="lineNum">     439 </span>                : };
<span class="lineNum">     440 </span>                : 
<span class="lineNum">     441 </span>                : //____________________________________________________________________________//
<span class="lineNum">     442 </span>                : 
<span class="lineNum">     443 </span>                : #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) 
<span class="lineNum">     444 </span>                : // Borland suffers premature pointer decay passing arrays by reference
<span class="lineNum">     445 </span>                : template&lt;typename T, std::size_t N &gt;
<span class="lineNum">     446 </span>                : struct print_helper_t&lt; T[N] &gt; {
<span class="lineNum">     447 </span>                :     explicit    print_helper_t( T const * t ) : m_t( t ) {}
<span class="lineNum">     448 </span>                : 
<span class="lineNum">     449 </span>                :     T const *   m_t;
<span class="lineNum">     450 </span>                : };
<span class="lineNum">     451 </span>                : #endif
<span class="lineNum">     452 </span>                : 
<span class="lineNum">     453 </span>                : //____________________________________________________________________________//
<span class="lineNum">     454 </span>                : 
<span class="lineNum">     455 </span>                : template&lt;typename T&gt;
<span class="lineNum">     456 </span><span class="lineNoCov">              0 : inline print_helper_t&lt;T&gt; print_helper( T const&amp; t )</span>
<span class="lineNum">     457 </span>                : {
<span class="lineNum">     458 </span><span class="lineNoCov">              0 :     return print_helper_t&lt;T&gt;( t );</span>
<span class="lineNum">     459 </span>                : }
<span class="lineNum">     460 </span>                : 
<span class="lineNum">     461 </span>                : //____________________________________________________________________________//
<span class="lineNum">     462 </span>                : 
<span class="lineNum">     463 </span>                : template&lt;typename T&gt;
<span class="lineNum">     464 </span>                : inline std::ostream&amp; 
<span class="lineNum">     465 </span><span class="lineNoCov">              0 : operator&lt;&lt;( std::ostream&amp; ostr, print_helper_t&lt;T&gt; const&amp; ph )</span>
<span class="lineNum">     466 </span>                : {
<span class="lineNum">     467 </span><span class="lineNoCov">              0 :     print_log_value&lt;T&gt;()( ostr, ph.m_t );</span>
<span class="lineNum">     468 </span>                : 
<span class="lineNum">     469 </span><span class="lineNoCov">              0 :     return ostr;</span>
<span class="lineNum">     470 </span>                : }
<span class="lineNum">     471 </span>                : 
<span class="lineNum">     472 </span>                : //____________________________________________________________________________//
<span class="lineNum">     473 </span>                : 
<span class="lineNum">     474 </span>                : // ************************************************************************** //
<span class="lineNum">     475 </span>                : // **************            TOOL BOX Implementation           ************** //
<span class="lineNum">     476 </span>                : // ************************************************************************** //
<span class="lineNum">     477 </span>                : 
<span class="lineNum">     478 </span>                : BOOST_TEST_DECL 
<span class="lineNum">     479 </span>                : bool check_impl( predicate_result const&amp; pr, ::boost::unit_test::lazy_ostream const&amp; check_descr,
<span class="lineNum">     480 </span>                :                  const_string file_name, std::size_t line_num,
<span class="lineNum">     481 </span>                :                  tool_level tl, check_type ct,
<span class="lineNum">     482 </span>                :                  std::size_t num_args, ... );
<span class="lineNum">     483 </span>                : 
<span class="lineNum">     484 </span>                : //____________________________________________________________________________//
<span class="lineNum">     485 </span>                : 
<span class="lineNum">     486 </span>                : #define TEMPL_PARAMS( z, m, dummy ) , typename BOOST_JOIN( Arg, m )
<span class="lineNum">     487 </span>                : #define FUNC_PARAMS( z, m, dummy )                                                  \
<span class="lineNum">     488 </span>                :     , BOOST_JOIN( Arg, m ) const&amp; BOOST_JOIN( arg, m )                              \
<span class="lineNum">     489 </span>                :     , char const* BOOST_JOIN( BOOST_JOIN( arg, m ), _descr )                        \
<span class="lineNum">     490 </span>                : /**/
<span class="lineNum">     491 </span>                : 
<span class="lineNum">     492 </span>                : #define PRED_PARAMS( z, m, dummy ) BOOST_PP_COMMA_IF( m ) BOOST_JOIN( arg, m ) 
<span class="lineNum">     493 </span>                : 
<span class="lineNum">     494 </span>                : #define ARG_INFO( z, m, dummy )                                                     \
<span class="lineNum">     495 </span>                :     , BOOST_JOIN( BOOST_JOIN( arg, m ), _descr )                                    \
<span class="lineNum">     496 </span>                :     , &amp;(const unit_test::lazy_ostream&amp;)(unit_test::lazy_ostream::instance()         \
<span class="lineNum">     497 </span>                :         &lt;&lt; ::boost::test_tools::tt_detail::print_helper( BOOST_JOIN( arg, m ) ))    \
<span class="lineNum">     498 </span>                : /**/
<span class="lineNum">     499 </span>                : 
<span class="lineNum">     500 </span>                : #define IMPL_FRWD( z, n, dummy )                                                    \
<span class="lineNum">     501 </span>                : template&lt;typename Pred                                                              \
<span class="lineNum">     502 </span>                :          BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), TEMPL_PARAMS, _ )&gt;            \
<span class="lineNum">     503 </span>                : inline bool                                                                         \
<span class="lineNum">     504 </span>                : check_frwd( Pred P, unit_test::lazy_ostream const&amp; check_descr,                     \
<span class="lineNum">     505 </span>                :             const_string file_name, std::size_t line_num,                           \
<span class="lineNum">     506 </span>                :             tool_level tl, check_type ct                                            \
<span class="lineNum">     507 </span>                :             BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), FUNC_PARAMS, _ )           \
<span class="lineNum">     508 </span>                : )                                                                                   \
<span class="lineNum">     509 </span>                : {                                                                                   \
<span class="lineNum">     510 </span>                :     return                                                                          \
<span class="lineNum">     511 </span>                :     check_impl( P( BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), PRED_PARAMS, _ ) ), \
<span class="lineNum">     512 </span>                :                 check_descr, file_name, line_num, tl, ct,                           \
<span class="lineNum">     513 </span>                :                 BOOST_PP_ADD( n, 1 )                                                \
<span class="lineNum">     514 </span>                :                 BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), ARG_INFO, _ )          \
<span class="lineNum">     515 </span>                :     );                                                                              \
<span class="lineNum">     516 </span>                : }                                                                                   \
<span class="lineNum">     517 </span>                : /**/
<span class="lineNum">     518 </span>                : 
<span class="lineNum">     519 </span>                : #ifndef BOOST_TEST_MAX_PREDICATE_ARITY
<span class="lineNum">     520 </span>                : #define BOOST_TEST_MAX_PREDICATE_ARITY 5
<span class="lineNum">     521 </span>                : #endif
<span class="lineNum">     522 </span>                : 
<span class="lineNum">     523 </span><span class="lineNoCov">              0 : BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )</span>
<span class="lineNum">     524 </span>                : 
<span class="lineNum">     525 </span>                : #undef TEMPL_PARAMS
<span class="lineNum">     526 </span>                : #undef FUNC_PARAMS
<span class="lineNum">     527 </span>                : #undef PRED_INFO
<span class="lineNum">     528 </span>                : #undef ARG_INFO
<span class="lineNum">     529 </span>                : #undef IMPL_FRWD
<span class="lineNum">     530 </span>                : 
<span class="lineNum">     531 </span>                : //____________________________________________________________________________//
<span class="lineNum">     532 </span>                : 
<span class="lineNum">     533 </span>                : template &lt;class Left, class Right&gt;
<span class="lineNum">     534 </span><span class="lineNoCov">              0 : predicate_result equal_impl( Left const&amp; left, Right const&amp; right )</span>
<span class="lineNum">     535 </span>                : {
<span class="lineNum">     536 </span><span class="lineNoCov">              0 :     return left == right;</span>
<span class="lineNum">     537 </span>                : }
<span class="lineNum">     538 </span>                : 
<span class="lineNum">     539 </span>                : //____________________________________________________________________________//
<span class="lineNum">     540 </span>                : 
<span class="lineNum">     541 </span>                : predicate_result        BOOST_TEST_DECL equal_impl( char const* left, char const* right );
<span class="lineNum">     542 </span>                : inline predicate_result equal_impl( char* left, char const* right ) { return equal_impl( (char const*)left, (char const*)right ); }
<span class="lineNum">     543 </span>                : inline predicate_result equal_impl( char const* left, char* right ) { return equal_impl( (char const*)left, (char const*)right ); }
<span class="lineNum">     544 </span>                : inline predicate_result equal_impl( char* left, char* right )       { return equal_impl( (char const*)left, (char const*)right ); }
<span class="lineNum">     545 </span>                : 
<span class="lineNum">     546 </span>                : #if !defined( BOOST_NO_CWCHAR )
<span class="lineNum">     547 </span>                : predicate_result        BOOST_TEST_DECL equal_impl( wchar_t const* left, wchar_t const* right );
<span class="lineNum">     548 </span>                : inline predicate_result equal_impl( wchar_t* left, wchar_t const* right ) { return equal_impl( (wchar_t const*)left, (wchar_t const*)right ); }
<span class="lineNum">     549 </span>                : inline predicate_result equal_impl( wchar_t const* left, wchar_t* right ) { return equal_impl( (wchar_t const*)left, (wchar_t const*)right ); }
<span class="lineNum">     550 </span>                : inline predicate_result equal_impl( wchar_t* left, wchar_t* right )       { return equal_impl( (wchar_t const*)left, (wchar_t const*)right ); }
<span class="lineNum">     551 </span>                : #endif
<span class="lineNum">     552 </span>                : 
<span class="lineNum">     553 </span>                : //____________________________________________________________________________//
<span class="lineNum">     554 </span>                : 
<span class="lineNum">     555 </span>                : struct equal_impl_frwd {
<span class="lineNum">     556 </span>                :     template &lt;typename Left, typename Right&gt;
<span class="lineNum">     557 </span>                :     inline predicate_result
<span class="lineNum">     558 </span><span class="lineNoCov">              0 :     call_impl( Left const&amp; left, Right const&amp; right, mpl::false_ ) const</span>
<span class="lineNum">     559 </span>                :     {
<span class="lineNum">     560 </span><span class="lineNoCov">              0 :         return equal_impl( left, right );</span>
<span class="lineNum">     561 </span>                :     }
<span class="lineNum">     562 </span>                : 
<span class="lineNum">     563 </span>                :     template &lt;typename Left, typename Right&gt;
<span class="lineNum">     564 </span>                :     inline predicate_result
<span class="lineNum">     565 </span>                :     call_impl( Left const&amp; left, Right const&amp; right, mpl::true_ ) const
<span class="lineNum">     566 </span>                :     {
<span class="lineNum">     567 </span>                :         return (*this)( right, &amp;left[0] );
<span class="lineNum">     568 </span>                :     }
<span class="lineNum">     569 </span>                : 
<span class="lineNum">     570 </span>                :     template &lt;typename Left, typename Right&gt;
<span class="lineNum">     571 </span>                :     inline predicate_result
<span class="lineNum">     572 </span><span class="lineNoCov">              0 :     operator()( Left const&amp; left, Right const&amp; right ) const</span>
<span class="lineNum">     573 </span>                :     {
<span class="lineNum">     574 </span>                :         typedef typename is_array&lt;Left&gt;::type left_is_array;
<span class="lineNum">     575 </span><span class="lineNoCov">              0 :         return call_impl( left, right, left_is_array() );</span>
<span class="lineNum">     576 </span>                :     }
<span class="lineNum">     577 </span>                : };
<span class="lineNum">     578 </span>                : 
<span class="lineNum">     579 </span>                : //____________________________________________________________________________//
<span class="lineNum">     580 </span>                : 
<span class="lineNum">     581 </span>                : struct ne_impl {
<span class="lineNum">     582 </span>                :     template &lt;class Left, class Right&gt;
<span class="lineNum">     583 </span>                :     predicate_result operator()( Left const&amp; left, Right const&amp; right )
<span class="lineNum">     584 </span>                :     {
<span class="lineNum">     585 </span>                :         return !equal_impl_frwd()( left, right );
<span class="lineNum">     586 </span>                :     }
<span class="lineNum">     587 </span>                : };
<span class="lineNum">     588 </span>                : 
<span class="lineNum">     589 </span>                : //____________________________________________________________________________//
<span class="lineNum">     590 </span>                : 
<span class="lineNum">     591 </span>                : struct lt_impl {
<span class="lineNum">     592 </span>                :     template &lt;class Left, class Right&gt;
<span class="lineNum">     593 </span>                :     predicate_result operator()( Left const&amp; left, Right const&amp; right )
<span class="lineNum">     594 </span>                :     {
<span class="lineNum">     595 </span>                :         return left &lt; right;
<span class="lineNum">     596 </span>                :     }
<span class="lineNum">     597 </span>                : };
<span class="lineNum">     598 </span>                : 
<span class="lineNum">     599 </span>                : //____________________________________________________________________________//
<span class="lineNum">     600 </span>                : 
<span class="lineNum">     601 </span>                : struct le_impl {
<span class="lineNum">     602 </span>                :     template &lt;class Left, class Right&gt;
<span class="lineNum">     603 </span>                :     predicate_result operator()( Left const&amp; left, Right const&amp; right )
<span class="lineNum">     604 </span>                :     {
<span class="lineNum">     605 </span>                :         return left &lt;= right;
<span class="lineNum">     606 </span>                :     }
<span class="lineNum">     607 </span>                : };
<span class="lineNum">     608 </span>                : 
<span class="lineNum">     609 </span>                : //____________________________________________________________________________//
<span class="lineNum">     610 </span>                : 
<span class="lineNum">     611 </span>                : struct gt_impl {
<span class="lineNum">     612 </span>                :     template &lt;class Left, class Right&gt;
<span class="lineNum">     613 </span>                :     predicate_result operator()( Left const&amp; left, Right const&amp; right )
<span class="lineNum">     614 </span>                :     {
<span class="lineNum">     615 </span>                :         return left &gt; right;
<span class="lineNum">     616 </span>                :     }
<span class="lineNum">     617 </span>                : };
<span class="lineNum">     618 </span>                : 
<span class="lineNum">     619 </span>                : //____________________________________________________________________________//
<span class="lineNum">     620 </span>                : 
<span class="lineNum">     621 </span>                : struct ge_impl {
<span class="lineNum">     622 </span>                :     template &lt;class Left, class Right&gt;
<span class="lineNum">     623 </span>                :     predicate_result operator()( Left const&amp; left, Right const&amp; right )
<span class="lineNum">     624 </span>                :     {
<span class="lineNum">     625 </span>                :         return left &gt;= right;
<span class="lineNum">     626 </span>                :     }
<span class="lineNum">     627 </span>                : };
<span class="lineNum">     628 </span>                : 
<span class="lineNum">     629 </span>                : //____________________________________________________________________________//
<span class="lineNum">     630 </span>                : 
<span class="lineNum">     631 </span>                : template &lt;typename Left, typename Right&gt;
<span class="lineNum">     632 </span>                : inline predicate_result
<span class="lineNum">     633 </span>                : equal_coll_impl( Left left_begin, Left left_end, Right right_begin, Right right_end )
<span class="lineNum">     634 </span>                : {
<span class="lineNum">     635 </span>                :     predicate_result    res( true );
<span class="lineNum">     636 </span>                :     std::size_t         pos = 0;
<span class="lineNum">     637 </span>                : 
<span class="lineNum">     638 </span>                :     for( ; left_begin != left_end &amp;&amp; right_begin != right_end; ++left_begin, ++right_begin, ++pos ) {
<span class="lineNum">     639 </span>                :         if( *left_begin != *right_begin ) {
<span class="lineNum">     640 </span>                :             res = false;
<span class="lineNum">     641 </span>                :             res.message() &lt;&lt; &quot;\nMismatch in a position &quot; &lt;&lt; pos &lt;&lt; &quot;: &quot;  &lt;&lt; *left_begin &lt;&lt; &quot; != &quot; &lt;&lt; *right_begin;
<span class="lineNum">     642 </span>                :         }
<span class="lineNum">     643 </span>                :     }
<span class="lineNum">     644 </span>                : 
<span class="lineNum">     645 </span>                :     if( left_begin != left_end ) {
<span class="lineNum">     646 </span>                :         std::size_t r_size = pos;
<span class="lineNum">     647 </span>                :         while( left_begin != left_end ) {
<span class="lineNum">     648 </span>                :             ++pos;
<span class="lineNum">     649 </span>                :             ++left_begin;
<span class="lineNum">     650 </span>                :         }
<span class="lineNum">     651 </span>                : 
<span class="lineNum">     652 </span>                :         res = false;
<span class="lineNum">     653 </span>                :         res.message() &lt;&lt; &quot;\nCollections size mismatch: &quot; &lt;&lt; pos &lt;&lt; &quot; != &quot; &lt;&lt; r_size;
<span class="lineNum">     654 </span>                :     }
<span class="lineNum">     655 </span>                : 
<span class="lineNum">     656 </span>                :     if( right_begin != right_end ) {
<span class="lineNum">     657 </span>                :         std::size_t l_size = pos;
<span class="lineNum">     658 </span>                :         while( right_begin != right_end ) {
<span class="lineNum">     659 </span>                :             ++pos;
<span class="lineNum">     660 </span>                :             ++right_begin;
<span class="lineNum">     661 </span>                :         }
<span class="lineNum">     662 </span>                : 
<span class="lineNum">     663 </span>                :         res = false;
<span class="lineNum">     664 </span>                :         res.message() &lt;&lt; &quot;\nCollections size mismatch: &quot; &lt;&lt; l_size &lt;&lt; &quot; != &quot; &lt;&lt; pos;
<span class="lineNum">     665 </span>                :     }
<span class="lineNum">     666 </span>                : 
<span class="lineNum">     667 </span>                :     return res;
<span class="lineNum">     668 </span>                : }
<span class="lineNum">     669 </span>                : 
<span class="lineNum">     670 </span>                : //____________________________________________________________________________//
<span class="lineNum">     671 </span>                : 
<span class="lineNum">     672 </span>                : template &lt;class Left, class Right&gt;
<span class="lineNum">     673 </span>                : inline predicate_result
<span class="lineNum">     674 </span>                : bitwise_equal_impl( Left const&amp; left, Right const&amp; right )
<span class="lineNum">     675 </span>                : {
<span class="lineNum">     676 </span>                :     predicate_result    res( true );
<span class="lineNum">     677 </span>                : 
<span class="lineNum">     678 </span>                :     std::size_t left_bit_size  = sizeof(Left)*CHAR_BIT;
<span class="lineNum">     679 </span>                :     std::size_t right_bit_size = sizeof(Right)*CHAR_BIT;
<span class="lineNum">     680 </span>                : 
<span class="lineNum">     681 </span>                :     static Left const leftOne( 1 );
<span class="lineNum">     682 </span>                :     static Right const rightOne( 1 );
<span class="lineNum">     683 </span>                : 
<span class="lineNum">     684 </span>                :     std::size_t total_bits = left_bit_size &lt; right_bit_size ? left_bit_size : right_bit_size;
<span class="lineNum">     685 </span>                : 
<span class="lineNum">     686 </span>                :     for( std::size_t counter = 0; counter &lt; total_bits; ++counter ) {
<span class="lineNum">     687 </span>                :         if( ( left &amp; ( leftOne &lt;&lt; counter ) ) != ( right &amp; ( rightOne &lt;&lt; counter ) ) ) {
<span class="lineNum">     688 </span>                :             res = false;
<span class="lineNum">     689 </span>                :             res.message() &lt;&lt; &quot;\nMismatch in a position &quot; &lt;&lt; counter;
<span class="lineNum">     690 </span>                :         }
<span class="lineNum">     691 </span>                :     }
<span class="lineNum">     692 </span>                : 
<span class="lineNum">     693 </span>                :     if( left_bit_size != right_bit_size ) {
<span class="lineNum">     694 </span>                :         res = false;
<span class="lineNum">     695 </span>                :         res.message() &lt;&lt; &quot;\nOperands bit sizes mismatch: &quot; &lt;&lt; left_bit_size &lt;&lt; &quot; != &quot; &lt;&lt; right_bit_size;
<span class="lineNum">     696 </span>                :     }
<span class="lineNum">     697 </span>                : 
<span class="lineNum">     698 </span>                :     return res;
<span class="lineNum">     699 </span>                : }
<span class="lineNum">     700 </span>                : 
<span class="lineNum">     701 </span>                : //____________________________________________________________________________//
<span class="lineNum">     702 </span>                : 
<span class="lineNum">     703 </span>                : bool BOOST_TEST_DECL is_defined_impl( const_string symbol_name, const_string symbol_value );
<span class="lineNum">     704 </span>                : 
<span class="lineNum">     705 </span>                : //____________________________________________________________________________//
<span class="lineNum">     706 </span>                : 
<span class="lineNum">     707 </span>                : } // namespace tt_detail
<span class="lineNum">     708 </span>                : 
<span class="lineNum">     709 </span>                : } // namespace test_tools
<span class="lineNum">     710 </span>                : 
<span class="lineNum">     711 </span>                : namespace test_toolbox = test_tools;
<span class="lineNum">     712 </span>                : 
<span class="lineNum">     713 </span>                : } // namespace boost
<span class="lineNum">     714 </span>                : 
<span class="lineNum">     715 </span>                : //____________________________________________________________________________//
<span class="lineNum">     716 </span>                : 
<span class="lineNum">     717 </span>                : #include &lt;boost/test/detail/enable_warnings.hpp&gt;
<span class="lineNum">     718 </span>                : 
<span class="lineNum">     719 </span>                : #endif // BOOST_TEST_TEST_TOOLS_HPP_012705GER
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
